﻿using System;
using System.Collections.Generic;
using Com.PhilChuang.Utils;

namespace Com.PhilChuang.Pmvp.Model.Services.Impl
{
	public class SendMessageService : ISendMessageService
	{
		public SendMessageService ()
		{
		}

		#region ISendMessageService Members
		public bool Send (IEnumerable<String> recips, String msg)
		{
			// TODO investigate if there's an issue with the size of the recipient list
			var task = new Microsoft.Phone.Tasks.SmsComposeTask ();
			task.To = recips.Print ("; ");
			task.Body = msg;
			task.Show ();
			return true; // right now, no way of knowing if the message was actually sent
		}
		#endregion

		#region IDisposable Members
		public void Dispose ()
		{
			// does nothing
		}
		#endregion
	}
}
